﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="Pages_Register" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="../Scripts/JScript.js" type="text/javascript"></script>
    <link href="../Style/Master.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            width: 40%;
            padding-left:5px;
        }
        .style2
        {
            width:20%;
        }
        #extendInfo > tbody
        {
            width:100%;
        }
    </style>
</head>
<body>
    
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div style="border:1px solid #E7EEF6; margin:10%;">
            <header style="padding:10px; color:#3366CC; background-color:#f5f5f5; ">ĐĂNG KÍ TÀI KHOẢN</header>
            <div style="padding:5px;">
                Nếu bạn đã có tài khoản vui lòng <a>đăng nhập</a><br />
                Nếu bạn quyên mật khẩu vui lòng <a>cấp mật khẩu mới</a><br />
                Chấp nhận <a>login</a> với openID:<br />
                <img id="image1" runat="server" style=" height:32px;" alt="" src="<%$ Resources:Images, google %>" />
                <img id="Img1" runat="server" style="height:32px;" alt="" src="<%$ Resources:Images, yahoo %>" />
                <img id="Img2" runat="server" style="height:32px;" alt="" src="<%$ Resources:Images, facebook %>" />
            </div>
            <article>
                <h4 style="display: inline-block; margin-left: 6%; ; padding:15px 20px 3px 0px;color:#3366CC">THÔNG TIN BẮT BUỘC
                </h4>    
                <table style="width: 100%;">                
                    <tr>
                        <td colspan="3" style="padding-left: 21%;">                        
                            <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                                ValidationGroup="TaoTK" 
                                HeaderText="Đăng kí thất bại. Sửa những lỗi sau" />
                        </td>
                   
                    </tr>
                    <tr>
                        <td style="text-align: right" class="style2">
                        
                            <asp:CustomValidator ID="CustomValidator3" runat="server" 
                                ControlToValidate="tbTenDangNhap" ErrorMessage="Tên đăng nhập đã tồn tại" 
                                onservervalidate="CustomValidator3_ServerValidate" ValidationGroup="TaoTK"><span 
                                style="color:red;">*</span></asp:CustomValidator>
                        
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                ControlToValidate="tbTenDangNhap" 
                                ErrorMessage="Tên đăng nhập không dúng yêu cầu" 
                                ValidationExpression="\w{6,32}" ValidationGroup="TaoTK"><span 
                                style="color:red;">*</span></asp:RegularExpressionValidator>
                        
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" 
                                runat="server" ControlToValidate="tbTenDangNhap" 
                                ErrorMessage="Chưa nhập tên truy cập" 
                                Text="&lt;span  style=&quot;color:red;&quot;&gt;*&lt;/span&gt;" 
                                ValidationGroup="TaoTK"></asp:RequiredFieldValidator>
                        
                            Tên truy cập</td>
                        <td class="style1">
                        
                            <input id="tbTenDangNhap" runat="server" type="text" onmouseout="changeDisplay('noteTenDangNhap1','none');" onmouseover="changeDisplay('noteTenDangNhap1','block');" 
                                width="200px" class="rowTextBox" /></td>
                        <td class="noteRegister">
                            <asp:Label style="display:none;z-index:111;" ID="noteTenDangNhap1" runat="server" 
                                Text="<%$ Resources:RegisterPage,validateNodeTenDangNhap %>"></asp:Label>
                            <img id="Img3" runat="server" alt="" 
                                style="position:static;z-index:110; width: 97%; left: 573px;" 
                                src="<%$ Resources:Images,image1DK %>" /></td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="style2">
                        
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                ControlToValidate="tbMatKhau" 
                                ErrorMessage="Mật khẩu không đúng yêu cầu" ValidationExpression="\w{6,32}" 
                                ValidationGroup="TaoTK"><span 
                                style="color:red;">*</span></asp:RegularExpressionValidator>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" 
                                runat="server" ControlToValidate="tbMatKhau" 
                                ErrorMessage="Chưa nhập mật khẩu" 
                            
                            
                                Text="&lt;span style=&quot;color:red;&quot;&gt;*&lt;/span&gt;" 
                                ValidationGroup="TaoTK"></asp:RequiredFieldValidator>
                        
                            Mật khẩu</td>
                        <td class="style1">
                        
                            <asp:TextBox ID="tbMatKhau" runat="server" 
                                onmouseout="changeDisplay('notePass','none');" 
                                onmouseover="changeDisplay('notePass','block');" 
                                class="rowTextBox" TextMode="Password" /></td>
                        <td class="noteRegister">                        
                            <asp:Label ID="notePass" style="display:none; z-index:111;" runat="server" Text="<%$ Resources:Registerpage, validateNotePass %>"></asp:Label>
                        
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="style2">
                            <asp:CompareValidator ID="CompareValidator1" runat="server" 
                                ControlToCompare="tbXNMatKhau" ControlToValidate="tbMatKhau" 
                                ErrorMessage="Xác nhận mật khẩu không chính xác" 
                                ValidationGroup="TaoTK"><span 
                                style="color:red;">*</span></asp:CompareValidator>
                            Xác nhận mật khẩu</td>
                        <td class="style1">
                        
                            <asp:TextBox ID="tbXNMatKhau" runat="server"  
                                onmouseout="changeDisplay('noteRePass','none');" 
                                onmouseover="changeDisplay('noteRePass','block');" 
                                class="rowTextBox" TextMode="Password" /></td>
                        <td class="noteRegister">
                        
                            <asp:Label ID="noteRePass" style="display:none;z-index:111;" runat="server" Text="<%$ Resources:Registerpage, validateNoteRePass %>"></asp:Label></td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="style2">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" 
                                runat="server" ControlToValidate="tbTen" 
                                ErrorMessage="Chưa nhập tên" 
                            
                            
                                Text="&lt;span  style=&quot;color:red;&quot;&gt;*&lt;/span&gt;" 
                                ValidationGroup="TaoTK"></asp:RequiredFieldValidator>
                            Họ và tên</td>
                        <td class="style1">
                        
                            <input id="tbTen" runat="server" type="text" 
                                width="200px" class="rowTextBox" /></td>
                        <td class="noteRegister">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="style2">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" 
                                runat="server" ControlToValidate="ddNoiSinh" 
                                ErrorMessage="Chưa chọn nơi sinh" 
                            
                            
                                Text="&lt;span  style=&quot;color:red;&quot;&gt;*&lt;/span&gt;" 
                                ValidationGroup="TaoTK"></asp:RequiredFieldValidator>
                            Nơi sinh</td>
                        <td class="style1">
                        
                            <asp:DropDownList ID="ddNoiSinh" 
                                onmouseout="changeDisplay('noteNoiSinh','none');" onmouseover="changeDisplay('noteNoiSinh','block');"
                                runat="server" Width="97%" 
                                DataSourceID="SqlDataDiaChi" DataTextField="Ten" DataValueField="IDKhuVuc">
                            </asp:DropDownList>
                            <asp:SqlDataSource ID="SqlDataDiaChi" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:vnclickerConnectionString %>" 
                                SelectCommand="SELECT * FROM [KhuVuc]">
                            </asp:SqlDataSource>
                        </td>
                        <td class="noteRegister">
                        
                            <asp:Label ID="noteNoiSinh" runat="server" style="display:none;z-index:111;"
                                Text="<%$ Resources:Registerpage, validateNoteNoiSinh %>"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="style2">
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                                ControlToValidate="tbEmail" 
                                ErrorMessage="Không chấp nhận địa chỉ Email dưới" 
                                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                                ValidationGroup="TaoTK"><span style="color:red;">*</span></asp:RegularExpressionValidator>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" 
                                runat="server" ControlToValidate="tbEmail" 
                                ErrorMessage="Chưa nhập Email" 
                            
                            
                                Text="&lt;span  style=&quot;color:red;&quot;&gt;*&lt;/span&gt;" 
                                ValidationGroup="TaoTK"></asp:RequiredFieldValidator>
                            Email</td>
                        <td class="style1">
                        
                            <input id="tbEmail" runat="server" type="text" onmouseout="changeDisplay('noteEmail','none');" onmouseover="changeDisplay('noteEmail','block');"
                                width="200px" class="rowTextBox" /></td>
                        <td class="noteRegister">
                        
                            <asp:Label ID="noteEmail" runat="server" style="display:none;z-index:111;"
                                 Text="<%$ Resources:Registerpage, validateNoteEmail %>"></asp:Label></td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="style2">
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" 
                                ControlToValidate="tbMobile" 
                                ErrorMessage="Không chấp nhận số điện thoại dưới" 
                                ValidationExpression="[0+]\d{8,11}" ValidationGroup="TaoTK"><span 
                                style="color:red;">*</span></asp:RegularExpressionValidator>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" 
                                runat="server" ControlToValidate="tbMobile" 
                                ErrorMessage="Chưa nhập số ĐT" 
                            
                            
                                Text="&lt;span  style=&quot;color:red;&quot;&gt;*&lt;/span&gt;" 
                                ValidationGroup="TaoTK"></asp:RequiredFieldValidator>
                            Điện thoại</td>
                        <td class="style1">
                        
                            <input id="tbMobile" runat="server" type="text"    onmouseout="changeDisplay('noteMobile','none');" 
                                onmouseover="changeDisplay('noteMobile','block');" 
                                width="200px" class="rowTextBox" /></td>
                        <td class="noteRegister">                        
                            <asp:Label ID="noteMobile" runat="server" style="display:none;z-index:111;"
                                Text="<%$ Resources:Registerpage, validateNoteMobile %>"></asp:Label></td></td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="style2">
                            Mã an toàn</td>
                        <td class="style1">
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <ContentTemplate>                        
                                    <asp:Image ID="ImageCapCha" Height="50px" Width="100px" runat="server" 
                                        ImageUrl="../ImageCapcha.aspx" />
                                    <asp:ImageButton ID="btnRefreshCapcha"                                 
                                        runat="server" 
                                        style="display:inline-block; margin-bottom:9px; margin-left:5px; " 
                                        Height="30px" Width="30px"
                                        ImageUrl="<%$ Resources:Images, refreshCapcha %>" onclick="refreshCapcha" 
                                        ></asp:ImageButton>    
                                    &nbsp;</td>
                                </ContentTemplate>
                                <Triggers>
                                    <asp:PostBackTrigger ControlID="btnRefreshCapcha" />
                                </Triggers>
                            </asp:UpdatePanel> 
                        <td class="noteRegister">
                        
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="style2">
                            <asp:CustomValidator ID="CustomValidator1" runat="server" 
                                ErrorMessage="Nhập mã an toàn không chính xá" 
                                ControlToValidate="tbMaAnToan" 
                                onservervalidate="CustomValidator1_ServerValidate" ValidationGroup="TaoTK" 
                                ValidateEmptyText="True"><span style="color:red;">*</span></asp:CustomValidator>
                            Nhập mã an toàn</td>
                        <td class="style1">
                        
                            <input id="tbMaAnToan" runat="server" type="text" onmouseout="changeDisplay('noteMaAnToan','none');" onmouseover="changeDisplay('noteMaAnToan','block');"
                                width="200px" class="rowTextBox" /></td>
                        <td class="noteRegister">                        
                            <asp:Label ID="noteMaAnToan" runat="server" style="display:none;z-index:111;"
                                 Text="<%$ Resources:Registerpage, validateNoteMaAnToan %>"></asp:Label></td>
                    </tr>
                    </table>
                <h4 style="display: inline-block; margin-left: 6%; ; padding:15px 20px 3px 0px;color:#3366CC">THÔNG TIN THÊM
                </h4>    
             
                <img src="../Icons/downArow.png" onclick="toggleShowOjb('extendInfo')" style=" cursor:pointer; margin-left: -15px;margin-top: 10px;height:24px; height:24px; position: absolute;"/>
                <table id="extendInfo" style="width: 100%; display:;">
                    <tr>
                        <td style="text-align: right" class="style2">
                        
                            Link ảnh đại diện</td>
                        <td class="style1">
                        
                            <input id="tbLinkAvarta" runat="server" placeholder="<%$ Resources:RegisterPage,NoAvarta %>"  type="text" onblur="setUrl(this,'imageAvarta')" onmouseout="changeDisplay('noteLinkAnh','none');" onmouseover="changeDisplay('noteLinkAnh','block');"
                                width="200px" class="rowTextBox" /></td>
                        <td class="noteRegister">
                        
                            <img runat="server" id="imageAvarta" alt="" src="<%$ Resources:RegisterPage,NoAvarta %>" 
                                style="position:absolute;z-index:110; width: 30%; "  
                                 />
                            <asp:Label ID="noteLinkAnh" runat="server" style="display:none; z-index:111;"
                                Text="<%$ Resources:Registerpage, validateNoteLinkAnh %>"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="style2">
                            Số CMND hoặc giấy tờ khác</td>
                        <td class="style1">
                        
                            <input id="tbCMND" runat="server" type="text" 
                                width="200px" class="rowTextBox" /></td>
                        <td class="noteRegister">
                        
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="style2">
                            <asp:CustomValidator ID="CustomValidator2" runat="server" 
                                ErrorMessage="Ngày sinh không chính xác" 
                                ControlToValidate="tbNgaySinh" 
                                onservervalidate="CustomValidator2_ServerValidate" ValidationGroup="TaoTK"><span style="color:red;">*</span></asp:CustomValidator>
                            Ngày sinh</td>
                        <td class="style1">
                        
                            <input id="tbNgaySinh" runat="server" type="text" onmouseout="changeDisplay('noteNgaySinh','none');" onmouseover="changeDisplay('noteNgaySinh','block');"
                                width="200px" class="rowTextBox" /></td>
                        <td class="noteRegister">
                            <asp:Label ID="noteNgaySinh" runat="server" style="display:none;z-index:111;"
                                Text="<%$ Resources:Registerpage, validateNoteNgaySinh %>"></asp:Label>
                            </td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="style2">
                            Website</td>
                        <td class="style1">
                        
                            <input id="tbWebsite" runat="server" type="text" 
                                width="200px" class="rowTextBox" /></td>
                        <td class="noteRegister">
                        
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="style2">
                            Điện thoại cố định</td>
                        <td class="style1">
                        
                            <input id="tbPhone" runat="server" type="text" 
                                width="200px" class="rowTextBox" /></td>
                        <td class="noteRegister">
                        
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="style2">
                            Ngân hàng</td>
                        <td class="style1">
                            <asp:DropDownList ID="ddNganHang" 
                                runat="server" Width="97%" 
                                DataSourceID="SqlDataNganHang" DataTextField="TenDayDu" 
                                DataValueField="IDNganHang">
                            </asp:DropDownList>
                            <asp:SqlDataSource ID="SqlDataNganHang" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:vnclickerConnectionString %>" 
                                SelectCommand="SELECT [IDNganHang], [TenDayDu] FROM [NganHang]">
                            </asp:SqlDataSource>
                            </td>
                        <td class="noteRegister">
                        
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td style="text-align: right" class="style2">
                            Số TK Ngân hàng</td>
                        <td class="style1">
                        
                            <input id="tbSoTaiKhoan" runat="server" type="text" 
                                width="200px" class="rowTextBox" /></td>
                        <td class="noteRegister">
                        
                            &nbsp;</td>
                    </tr>
                    </table>
                    <div style="padding-left:20%; padding-top: 10px;">
                        <asp:CheckBox ID="cbAgree" runat="server"
                             AutoPostBack="True"  Text="<%$ Resources:RegisterPage, TextDongY %>"  
                            oncheckedchanged="cbAgree_CheckedChanged" />
                        <asp:HyperLink 
                            ID="linkDieuKhoan" runat="server" Text="<%$ Resources:RegisterPage, TextDieuKhoan %>"
                            NavigateUrl="<%$ Resources:RegisterPage, WebsiteName %>"  
                            ></asp:HyperLink> <br />
                        <asp:Button class="btnGray" style="margin-left:100px; margin-top:10px;" 
                            ID="btnTaoTK" runat="server" 
                            Text="<%$ Resources:RegisterPage, TextBtnTaoTaiKhoan %>"   Enabled="False" ValidationGroup="TaoTK" onclick="btnTaoTK_Click1"
                             />
                      
                    </div>
            </article>
        </div>
    </form>
</body>
</html>
